package 状态设计模式;

public class Main {
    public static void main(String[] args) {
        Context context = new Context();
        State state = new StartState();
        state.doAction(context);
        System.out.println(context.getState().toString());
        state = new EndState();
        state.doAction(context);
        System.out.println(context.getState().toString());
    }
}
